﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace FixtureManageSystem.Models
{
    class Ledger : BaseModel, INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;


        /// <summary>
        /// 实际库存总数
        /// </summary>
        private int actualInventory;
        public int ActualInventory
        {
            get
            {
                return actualInventory;
            }
            set
            {
                if (value != this.actualInventory)
                {
                    actualInventory = value;
                    OnPropertyChanged();
                }
            }
        }



        //本月入库总数
        private int receipt;
        public int Receipt
        {
            get { return receipt; }
            set
            {
                if (value != receipt)
                {
                    receipt = value;
                    OnPropertyChanged();
                }
            }
        }
        // 本月借用总数
        private int borrow;
        public int Borrow
        {
            get { return borrow; }
            set
            {
                if (value != borrow)
                {
                    borrow = value;
                    OnPropertyChanged();
                }
            }
        }

        // 本月归还总数
        private int returnNum;
        public int ReturnNum
        {
            get { return returnNum; }
            set
            {
                if (value != returnNum)
                {
                    returnNum = value;
                    OnPropertyChanged();
                }
            }
        }


        // 总借用数量
        private int totalBorrow;
        public int TotalBorrow
        {
            get { return totalBorrow; }
            set
            {
                if (value != totalBorrow)
                {
                    totalBorrow = value;
                    OnPropertyChanged();
                }
            }
        }


        // 归还总数
        private int totalReturn;
        public int TotalReturn
        {
            get { return totalReturn; }
            set
            {
                if (value != totalReturn)
                {
                    totalReturn = value;
                    OnPropertyChanged();
                }
            }
        }


        // 入库总数
        private int totalReceipt;
        public int TotalReceipt
        {
            get { return totalReceipt; }
            set
            {
                if (value != totalReceipt)
                {
                    totalReceipt = value;
                    OnPropertyChanged();
                }
            }
        }


        private void OnPropertyChanged([CallerMemberName] String propertyName = "")
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
